//
//  PlayerViewController.h
//  ICE_Player
//
//  Created by xl on 11-10-12.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "ICE_View_Interface.h"
#import "PlayerView.h"
#import "Player_Model.h"
#import "MSG_BOX_View.h"


@interface PlayerViewController : ICE_View_Controller {
    BOOL has_rotated;
    BOOL should_rotate;
    PlayerView* p_player_view;
    Player_Model* player;
    MSG_BOX_View* mb_view;
    float volume;
    long cur_play_sec;
    long file_len_sec;
    char* cur_url;
    long file_idx;
    
    ICE_String* leave_mb_title;
    ICE_String* leave_mb_content;
    ICE_String* error_mb_title;
    ICE_String* error_mb_content;
    
    BOOL enable_data_refresh_timer;
    NSTimer* data_refresh_timer;
    NSTimer* control_hide_timer;
    BOOL is_timering_control_hide;
    
    BOOL is_silented;
    float vol_before_silent;
    
    BOOL msg_box_leave;
    BOOL msg_is_player_view_hidden;
    
    BOOL touch_event_has_posted;
}

@property (nonatomic, retain) IBOutlet PlayerView* p_player_view;
@property (nonatomic, retain) IBOutlet MSG_BOX_View* mb_view;
@property BOOL enable_data_refresh_timer;

-(IBAction)On_Put_Loop_Mode_Btn:(id)sender;
-(IBAction)On_Put_Play_Btn:(id)sender;
-(IBAction)On_Put_Screen_Mode_Btn:(id)sender;
-(IBAction)On_Put_Volume_Btn:(id)sender;
-(void)On_Drag_Time_Pos_Bar:(float)percents;
-(void)On_Drag_Vol_Pos_Bar:(float)percents;
-(void)On_set_Time_Pos:(float)percents;
-(void)On_Set_Vol:(float)percents;

- (void)On_Display_Player_View:(char*)url;
- (void)On_Hide_Player_View;
- (BOOL)On_Change_File:(BOOL)is_forward;
- (void)On_State_Change:(id)param;

@end
